#防止实体数量过大
scoreboard players set @e number 1
scoreboard players operation fb-stat number += @e[type=falling_block] number
scoreboard players operation item-stat number += @e[type=item] number
scoreboard players operation et-stat number += @e[type=!armor_stand,type=!player,type=!item,type=!falling_block,type=!item_frame,type=!glow_item_frame,type=!painting] number
execute if score fb-stat number matches 300.. run kill @e[type=falling_block]
execute if score item-stat number matches 300.. run kill @e[type=item]
execute if score et-stat number matches 100.. run tellraw @a [{"text": "[SDP] 实体数量过多已进行清理，请及时查看原因","color":"aqua"}]
execute if score et-stat number matches 100.. run kill @e[type=!armor_stand,type=!player,type=!falling_block,type=!item_frame,type=!glow_item_frame,type=!painting]
scoreboard players set fb-stat number 0
scoreboard players set item-stat number 0
scoreboard players set et-stat number 0 
#扫地工(清理一般实体和掉落物)
scoreboard players add clear-stat number 1
execute if score clear-stat number matches 11900 run tellraw @a [{"text":"[","color":"gold"},{"text": "S","color": "aqua"},{"text": "D","color": "green"},{"text": "P","color": "red"},{"text": " | ","color": "dark_aqua"},{"text": "扫地工","color": "aqua","bold": true},{"text": "] ","color": "gold"},{"text": "还有5秒钟扫地","color": "red"}]
execute if score clear-stat number matches 12000 run kill @e[type=!armor_stand,type=!player,type=!falling_block,type=!item_frame,type=!glow_item_frame,type=!painting,tag=!storage]
execute if score clear-stat number matches 12000 run tellraw @a [{"text":"[","color":"gold"},{"text": "S","color": "aqua"},{"text": "D","color": "green"},{"text": "P","color": "red"},{"text": " | ","color": "dark_aqua"},{"text": "扫地工","color": "aqua","bold": true},{"text": "] ","color": "gold"},{"text": "扫地完成","color": "red"}]
execute if score clear-stat number matches 12000 run scoreboard players set clear-stat number 0
scoreboard players enable @a language.en_US
scoreboard players enable @a language.zh_CN



